package com.wyp.demo.pattern.proxy.cglb;

import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;

/**
 * @author: Oliver
 * @time: 2020/12/20/15:06
 */
public class CGLIGUtil {

    public static <T> T cglibProxy(T target, MethodInterceptor interceptor) {
        return (T) Enhancer.create(target.getClass(), interceptor);
    }
}
